package com.project.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.project.bean.RoomBean;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

@Mapper
public interface IRoomMapper extends BaseMapper<RoomBean> {
    public IPage<RoomBean> findByItem(Page pg,
           @Param("address") String address,@Param("status") String status,
           @Param("isIn") String isIn,@Param("type") String type);

    /**
     *  按ID查询房间信息，同时查询房间已住人数
     * @param id 房间ID
     * @return 房间对象
     */
    public RoomBean findById(int id);
}
